1. Field of the Invention
The invention generally relates to computer graphics devices and, more particularly, the invention relates to data conversion in graphics devices.
2. Background Art
Computer systems often include graphics systems for processing and transforming video pixel data so that the data can be represented on a computer monitor as an image. One such transformation is the conversion from one color space to another color space. Video pixel data from television or from video tape is typically, represented in xe2x80x9cYUVxe2x80x9d (luminance, differential value between the luminance and the red chrominance, differential value between the luminance and the blue chrominance) color space. In order to display such an image on a computer monitor the YUV color space information must be converted to RGB (red, green, blue) color space information. In one such system 10-bit YUV 4:4:2 data is interpolated into 10-bit YUV 4:4:4 data and then converted into 12-bit RGB data where the transformation creates 12 bits of red, 12 bits of green, and 12 bits of blue. In the current art, graphics processors have pipelines which store 8 bits for each red, green and blue value. As a result, there are 4 bits of information which cannot be used in the graphics processor. One solution to the problem is to truncate the last 4 bits of information from the 12-bit data, however this reduces the number of color variation levels that are available for representation which provides less variations of color than the human eye is capable of perceiving.
In accordance with one aspect of the invention, a method for converting color data from a higher color resolution to a lower color resolution is disclosed. In this method, the number of colors available at the higher resolution is maintained at the lower color resolution. It should be understood that the color data is composed of a plurality of bits and that the color data is displayed on a display device as a plurality of pixels. The method begins with the selection of a subset of pixels of the image represented by the color data at the higher color resolution. Each pixel has a relative position within the subset. In one embodiment, the subset is a square group of pixels. The color data for each pixel within the subset is divided into a first part and a second part. In the preferred embodiment, the first part is composed of the most significant bits and the second part is composed of the least significant bits. The second part is compared to a corresponding value in a lookup table wherein the corresponding value is determined by the relative position of the pixel in the subset. Based upon the comparison, it is determined if the first part should be incremented. By incrementing the pixels in an ordered fashion, ordered dithering is achieved and the higher color resolution is maintained. This is done for the red, green and blue color data for each pixel of the subset either in parallel or in series.